package com.ipzoe.common.service;

import com.ipzoe.common.bean.entity.Account;
import com.ipzoe.common.repository.AccountRepository;
import com.ipzoe.common.util.DefaultService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * 用户Service
 * <p>
 * Created 2018/01/19.
 *
 * @author pfzhang
 */
@Service
@Transactional(rollbackFor = RuntimeException.class)
public class AccountService extends DefaultService<Account> {

    private AccountRepository accountRepository;

    @Resource
    public void setAccountRepository(AccountRepository accountRepository) {
        this.accountRepository = accountRepository;
        super.setDefaultMapper(accountRepository);
    }
}
